from pydantic import BaseModel, constr
from datetime import datetime

class ChangePasswordRequest(BaseModel):
    old_password: constr(min_length=6, max_length=50)
    new_password: constr(min_length=6, max_length=50)

class FavoriteSpotResponse(BaseModel):
    id: int
    name: str
    description: str
    price: float
    images: str
    favorited_at: datetime

    class Config:
        from_attributes = True

class OrderSummaryResponse(BaseModel):
    total_orders: int
    total_spent: float
    recent_spots: list[str]

    class Config:
        from_attributes = True 